package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsOrderMapper;
import com.qf.mapper.StatMapper;
import com.qf.pojo.DtsOrder;
import com.qf.service.OrderService;
import com.qf.vo.DayStatis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    DtsOrderMapper orderMapper;
    @Autowired
    StatMapper statMapper;
    @Override
    public int showAllOrderCount() {
        LambdaQueryWrapper<DtsOrder> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(DtsOrder::getDeleted,false);
        Integer integer = orderMapper.selectCount(queryWrapper);
        return integer;
    }

    @Override
    public List<DayStatis> findDayStatis(int day) {
        return statMapper.findDayStatis(day);
    }
}
